package com.sskj.lib.bean.enums;

import android.support.v4.content.ContextCompat;

import com.sskj.common.base.App;
import com.sskj.lib.R;

public enum ColorEnum {
    UP(R.color.libGreen), DOWN(R.color.libRed);
    private int color;

    ColorEnum(int color) {
        this.color = color;
    }

    public static int getColor(boolean isUp){
        if (!isUp){
            return DOWN.getColor();
        }
        return UP.getColor();
    }
    public int getColor() {
        return ContextCompat.getColor(App.INSTANCE,color);
    }

    public void setColor(int color) {
        this.color = color;
    }
}
